Improved Normal Form for Grammars with One-Sided Contexts
نویسنده
چکیده
Formal grammars equipped with operators for specifying the form of the context of a substring were recently studied by Barash and Okhotin (“An extension of context-free grammars with one-sided context specifications”, Inform. Comput., 2014), further extending the author’s earlier work on propositional connectives in grammars (A. Okhotin, “Conjunctive grammars”, J. Autom. Lang. Comb., 2001). These grammars allow two types of context specifications: for a substring v of a string uvx, a proper left context operator CD states that u is of the form described by D, and an extended left context operator PE states that uv is described by E. This paper establishes a normal form for these grammars, in which extended left contexts are never used, whereas left contexts may be applied only to individual symbols, so that all rules are of the form A→ B1C1 & . . .&BmCm or A→ a&CD. This eliminates circular dependencies in the grammar and leads to a new, clearer version of the known cubic-time parsing algorithm. With some further improvements, the algorithm is accelerated from time O(n) to time O( n 3 logn ).
منابع مشابه
Grammars with two-sided contexts
In a recent paper (M. Barash, A. Okhotin, “Defining contexts in context-free grammars”, LATA 2012), the authors introduced an extension of the context-free grammars equipped with an operator for referring to the left context of the substring being defined. This paper proposes a more general model, in which context specifications may be two-sided, that is, both the left and the right contexts ca...
متن کاملTwo-sided context specifications in formal grammars
In a recent paper (M. Barash, A. Okhotin, “An extension of context-free grammars with one-sided context specifications”, Inform. Comput., 2014), the authors introduced an extension of the context-free grammars equipped with an operator for referring to the left context of the substring being defined. This paper proposes a more general model, in which context specifications may be two-sided, tha...
متن کاملAn extension of context-free grammars with one-sided context specifications
The paper introduces an extension of context-free grammars equipped with a quantifier for referring to the left context, in which the substring being defined does occur. For example, a rule A→ a& B defines a string a, as long as it is preceded by any string defined by B. The conjunction operator in this example is taken from conjunctive grammars (Okhotin, 2001), which are an extension of the st...
متن کاملGeneralized LR Parsing for Grammars with Contexts
The Generalized LR parsing algorithm for context-free grammars is notable for having a decent worst-case running time (cubic in the length of the input string), as well as much better performance on “good” grammars. This paper extends the Generalized LR algorithm to the case of “grammars with left contexts” (M. Barash, A. Okhotin, “An extension of context-free grammars with one-sided context sp...
متن کاملComparison between Frequentist Test and Bayesian Test to Variance Normal in the Presence of Nuisance Parameter: One-sided and Two-sided Hypothesis
This article is concerned with the comparison P-value and Bayesian measure for the variance of Normal distribution with mean as nuisance paramete. Firstly, the P-value of null hypothesis is compared with the posterior probability when we used a fixed prior distribution and the sample size increases. In second stage the P-value is compared with the lower bound of posterior probability when the ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2013